<%@ taglib uri="/struts-tags" prefix="s"%>

<aside class="column custom-side-column">
	<div class="box-shadow background-white margin-bottom clearfix">
		<div
			class="clearfix background-light-gray border-bottom heading-padding">
			<h3 class="middle no-margin-top no-margin-bottom">Categories</h3>
		</div>
		<div class="content-padding">
			<div class="category-container">
				<ul class="arrow-bullet extra-small-margin-top filters categories">
					<s:iterator value="categoryList" var="category">
						<s:if test="%{#category.children.isEmpty}">
							<li id="category-${category.id}" class="categories"><s:url
									action="listing" var="listing">
									<s:param name="categoryId" value="%{#category.id}" />
								</s:url> <s:a href="%{listing}">
									<s:property value="name" />(<s:property value="countPost" />)
										</s:a></li>
						</s:if>
						<s:else>
							<li id="category-${category.id}" class="categories"
								style="color: rgb(10, 130, 174);"><s:url action="listing"
									var="listing">
									<s:param name="categoryId" value="%{#category.id}" />
								</s:url> <s:a href="%{listing}" style="color: rgb(10, 130, 174);">
									<s:property value="name" />
										</s:a> <a class="expander-wrapper" href=""
								style="color: rgb(10, 130, 174);"><i
									class="fa fa-caret-right left expander"
									data-target="category-${category.id}"></i></a> <s:iterator
									value="#category.children" var="subCategory">
									<ul
										class="arrow-bullet extra-small-margin-top filters categories">
										<li id="category-${subCategory.id}" class="categories"><s:url
												action="listing" var="listing">
												<s:param name="categoryId" value="%{#subCategory.id}" />
											</s:url> <s:a href="%{listing}" style="color: rgb(10, 130, 174);">
												<s:property value="name" />(<s:property value="countPost" />)
													</s:a></li>
									</ul>
								</s:iterator></li>
						</s:else>
					</s:iterator>
				</ul>
			</div>
		</div>
	</div>
</aside>